{layout name="layout" /}
<h3>
    公共控制器
    <div class="layui-form-item" style="display: inline-block;">
        <div class="layui-input-block">
            <a href="{:url('basecontroller')}?file=1&mokuai={$mokuai}" class="layui-btn" lay-submit lay-filter="basecontroller">生成公共控制器文件</a>
        </div>
    </div>
</h3>
<textarea readonly style="width: 100%; height: 550px; font-family: &quot;Courier New&quot;; font-size: 12px; line-height: 1.5;">
namespace app\{$mokuai}\controller;
use think\Controller;
use think\Db;
use think\Url;
use think\Response;
use think\Request;
use think\Loader;
use think\facade\Hook;
use Demo;
//公共控制器
class Base extends Controller
{
    //定义前置方法名
    protected $beforeActionList = [
        'base',
    ];
    //空方法
    public function _empty($name)
    {
        return $this->error("空方法");//可跳转到404
    }
    //前置方法
    public function base()
    {

    }
}
</textarea>
